package day7;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileRead3 {
    public static void main(String[] args) {
        FileInputStream fin = null;
        try {
            fin = new FileInputStream("D:\\Documents\\桌面\\rent-freely-master\\free-room\\README.txt");

            byte b[] = new byte[fin.available()];//不能太多
            int len = fin.read(b);
            String str=new String(b,0,len);
            System.out.println(str);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fin != null) {
                try {
                    fin.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
